<footer th:fragment="com1(message)">
    this is com1
    <p th:text="${message}"></p>
</footer>

<footer id="com2">
    this is com2
</footer>

<div th:fragment="com4(message)">
    <p th:replace="${message}">原本的message</p>
</div>